<?php
include("helper/connexion.php");
include("helper/enseignant_helper.php");
connexion_sql();
$id = (int) $_POST['id'];

suppressionEnseignant($id);
?>
<table class="table table-hover">
<thead><tr><th>Nom</th><th>Prenom</th><th>Statut</th><th>Action</th></tr></thead>
<?php
$req = getEnseignants();
while($row = pg_fetch_assoc($req)){
    echo " <tr><td><a href='detail_enseignant.php?id=".$row["id"]."'>".$row["nom"]."</a></td><td>".$row["prenom"]."</td><td>".$row["statut"]."</td><td><a href='modification_ens.php?id=".$row["id"]."'>Modifier</a></td><td><a href='#' onclick='suppr_enseignant(".$row["id"].")'>Suppression</a></td></tr>";
}
?>
</table>
